import request from '@/utils/request'

export function getCardListAPI(params) {
  return request({
    url: '/parking/card/list',
    params
  })
}

export function createCardAPI(data) {
  return request({
    url: '/parking/card',
    method: 'post',
    data
  })
}

// 获取月卡详情
export function getCardDetailAPI(id) {
  return request({
    url: `/parking/card/detail/${id}`
  })
}

// 更新月卡
export function updateCardAPI(data) {
  return request({
    url: '/parking/card/edit',
    method: 'put',
    data

  })
}

// 删除月卡
export function delCardAPI(id) {
  return request({
    url: `parking/card/${id}`,
    method: 'delete'
  })
}
